From: Camila Ayres Date: Tue, 18 Feb 2025 16:59:09 +0000 (+0100) Subject: Check if folder exists before deleting sync db and VFS sync root connection. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~46^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=3bba21e14b98a2d57d22230a8fd41549cc1b7dec;p=nextcloud-desktop.git Check if folder exists before deleting sync db and VFS sync root connection. Fix for #7860. Signed-off-by: Camila Ayres --- diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 0d7166acb..85e004995 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -1020,15 +1020,20 @@ void Folder::slotTerminateSync() void Folder::wipeForRemoval() { - // Delete files that have been partially downloaded. - slotDiscardDownloadProgress(); - disconnectFolderWatcher(); // Unregister the socket API so it does not keep the .sync_journal file open FolderMan::instance()->socketApi()->slotUnregisterPath(alias()); _journal.close(); // close the sync journal + if (!QDir(path()).exists()) { + qCCritical(lcFolder) << "db files are not going to be deleted, sync folder could not be found at" << path(); + return; + } + + // Delete files that have been partially downloaded. + slotDiscardDownloadProgress(); + // Remove db and temporaries QString stateDbFile = _engine->journal()->databaseFilePath();